﻿# xls翻訳データ → ソースデータテーブル。
#	※ このファイルは、UTF8が扱えるエディタで編集して下さい。
#

package Xls2dat;
use strict;
use utf8;

our @SHARP_NORMAL_TABLE = (
	{ trans => "LV",      conv => "Lv_," },
	{ trans => "SEMI",    conv => "scolon_," },
	{ trans => "CURSOR",  conv => "cursor_," },
	{ trans => "DDQUOTE", conv => "kakot2_," },

	{ trans => "UP",      conv => "ArrowU__," },
	{ trans => "DOWN",    conv => "ArrowD__," },
	{ trans => "LEFT",    conv => "ArrowL__," },
	{ trans => "RIGHT",   conv => "ArrowR__," },

	{ trans => "LEADER",  conv => "tenten_,",       sort_conv => "..." },

	{ trans => "CDOT",    conv => "nakag_," },
	{ trans => "DQUOTE",  conv => "kako2_," },
	{ trans => "DSQUOTE", conv => "kakot_," },
	{ trans => "FEMALE",  conv => "mesu_,",         sort_conv => "f" },
	{ trans => "SQUOTE",  conv => "kako_," },
	{ trans => "MALE",    conv => "osu_,",          sort_conv => "m" },
	{ trans => "PKMN",    conv => "ompk_,ommn_," },
	{ trans => "POKE",    conv => "ompo_,omke_," },
	{ trans => "PKRS",    conv => "ompk_,R__,S__,", sort_conv => "PKRS" },

	{ trans => "NULL",    conv => "",               sort_conv => "" },

	{ trans => "SUP_ER",  conv => "sup_er_,",       sort_conv => "あ" },	# ポケモンで使用される以外の文字ならなんでもよい。
	{ trans => "SUP_RE",  conv => "sup_re_,",       sort_conv => "い" },
	{ trans => "SUP_A",   conv => "ordf_,",         sort_conv => "う" },
	{ trans => "SUP_O",   conv => "ordm_,",         sort_conv => "え" },
	{ trans => "SUP_SE",  conv => "sup_e_,",        sort_conv => "お" },
	{ trans => "'s",      conv => "kakot_,s__,",    sort_conv => "'s" },	# エクセルで行頭に書けないため。
	{ trans => "'S",      conv => "kakot_,S__,",    sort_conv => "'S" },	# エクセルで行頭に書けないため。
	{ trans => "+",       conv => "plus_,",         sort_conv => "+" },
	{ trans => "-",       conv => "bou_,",          sort_conv => "-" },

	{ trans => "SCROLL",  conv => "SCROLL_WAIT_,\n" }	# スクロール単独で入力したいときの対応。
);

my ($N1, $Ñ1) = ("0" .. "9");
my ($A2, $Á2, $À2, $Â2, $Ä2) = ("0" .. "9");
my ($E2, $É2, $È2, $Ê2, $Ë2) = ("0" .. "9");
my ($O2, $Ó2, $Ò2, $Ô2, $Ö2) = ("0" .. "9");
my ($I2, $Í2, $Ì2, $Î2, $Ï2) = ("0" .. "9");
my ($U2, $Ú2, $Ù2, $Û2, $Ü2) = ("0" .. "9");
my ($C2, $Ç2) = ("0" .. "9");

my ($n1, $ñ1) = ("0" .. "9");
my ($a2, $á2, $à2, $â2, $ä2, $a_u2) = ("0" .. "9");
my ($e2, $é2, $è2, $ê2, $ë2, $er_u2) = ("0" .. "9");
my ($o2, $ó2, $ò2, $ô2, $ö2) = ("0" .. "9");
my ($i2, $í2, $ì2, $î2, $ï2) = ("0" .. "9");
my ($u2, $ú2, $ù2, $û2, $ü2) = ("0" .. "9");
my ($c2, $ç2) = ("0" .. "9");
my ($s2, $ß2, $se_u2) = ("0" .. "9");
my ($r2, $re_u2) = ("0" .. "9");

my ($exc1, $que1, $spc1) = ("0" .. "9");
my ($rexc2, $exc2) = ("0" .. "9");
my ($rque2, $que2) = ("0" .. "9");
my ($spc2, $o_u2) = ("0" .. "9");

our @NORMAL_TABLE = (
	{ trans => "À", conv => "Agrave_,", phase1 => "A",  phase2 => $À2 },
	{ trans => "Á", conv => "Aacute_,", phase1 => "A",  phase2 => $Á2 },
	{ trans => "Â", conv => "Acirc_,",  phase1 => "A",  phase2 => $Â2 },
	{ trans => "Ç", conv => "Ccedil_,", phase1 => "C",  phase2 => $Ç2 },
	{ trans => "È", conv => "Egrave_,", phase1 => "E",  phase2 => $È2 },
	{ trans => "É", conv => "Eacute_,", phase1 => "E",  phase2 => $É2 },
	{ trans => "Ê", conv => "Ecire_,",  phase1 => "E",  phase2 => $Ê2 },
	{ trans => "Ë", conv => "Euml_,",   phase1 => "E",  phase2 => $Ë2 },
	{ trans => "Ì", conv => "Igrave_,", phase1 => "I",  phase2 => $Ì2 },
	{ trans => "Î", conv => "Icirc_,",  phase1 => "I",  phase2 => $Î2 },
	{ trans => "Ï", conv => "Iuml_,",   phase1 => "I",  phase2 => $Ï2 },
	{ trans => "Ò", conv => "Ograve_,", phase1 => "O",  phase2 => $Ò2 },
	{ trans => "Ó", conv => "Oacute_,", phase1 => "O",  phase2 => $Ó2 },
	{ trans => "Ô", conv => "Ocirc_,",  phase1 => "O",  phase2 => $Ô2 },
	{ trans => "Œ", conv => "OElig_,",  phase1 => "OE", phase2 => "OE" },
	{ trans => "Ù", conv => "Ugrave_,", phase1 => "U",  phase2 => $Ù2 },
	{ trans => "Ú", conv => "Uacute_,", phase1 => "U",  phase2 => $Ú2 },
	{ trans => "Û", conv => "Ucirc_,",  phase1 => "U",  phase2 => $Û2 },
	{ trans => "Ñ", conv => "Ntilde_,", phase1 => "N$Ñ1" },
	{ trans => "ß", conv => "szlig_,",  phase1 => "s",  phase2 => $ß2 },
	{ trans => "à", conv => "agrave_,", phase1 => "a",  phase2 => $à2 },
	{ trans => "á", conv => "aacute_,", phase1 => "a",  phase2 => $á2 },
	{ trans => "ç", conv => "ccedil_,", phase1 => "c",  phase2 => $ç2 },
	{ trans => "è", conv => "egrave_,", phase1 => "e",  phase2 => $è2 },
	{ trans => "é", conv => "eacute_,", phase1 => "e",  phase2 => $é2 },
	{ trans => "ê", conv => "ecirc_,",  phase1 => "e",  phase2 => $ê2 },
	{ trans => "ë", conv => "euml_,",   phase1 => "e",  phase2 => $ë2 },
	{ trans => "ì", conv => "igrave_,", phase1 => "i",  phase2 => $ì2 },
	{ trans => "î", conv => "icirc_,",  phase1 => "i",  phase2 => $î2 },
	{ trans => "ï", conv => "iuml_,",   phase1 => "i",  phase2 => $ï2 },
	{ trans => "ò", conv => "ograve_,", phase1 => "o",  phase2 => $ò2 },
	{ trans => "ó", conv => "oacute_,", phase1 => "o",  phase2 => $ó2 },
	{ trans => "ô", conv => "ocirc_,",  phase1 => "o",  phase2 => $ô2 },
	{ trans => "œ", conv => "oelig_,",  phase1 => "oe", phase2 => "oe" },
	{ trans => "ù", conv => "ugrave_,", phase1 => "u",  phase2 => $ù2 },
	{ trans => "ú", conv => "uacute_,", phase1 => "u",  phase2 => $ú2 },
	{ trans => "û", conv => "ucirc_,",  phase1 => "u",  phase2 => $û2 },
	{ trans => "ñ", conv => "ntilde_,", phase1 => "n$ñ1" },
	{ trans => "&", conv => "amp_," },

	{ trans => "¿", conv => "iquest_,", phase1 => " $que1", phase2 => "$rque2" },
	{ trans => "¡", conv => "iexcl_,",  phase1 => " $exc1", phase2 => "$rexc2" },

	{ trans => "Í", conv => "Iacute_,", phase1 => "I", phase2 => $Í2 },
	{ trans => "â", conv => "acirc_,",  phase1 => "a", phase2 => $â2 },
	{ trans => "í", conv => "iacute_,", phase1 => "i", phase2 => $í2 },

	{ trans => "Ä", conv => "Auml_,",   phase1 => "A", phase2 => $Ä2 },
	{ trans => "Ö", conv => "Ouml_,",   phase1 => "O", phase2 => $Ö2 },
	{ trans => "Ü", conv => "Uuml_,",   phase1 => "U", phase2 => $Ü2 },
	{ trans => "ä", conv => "auml_,",   phase1 => "a", phase2 => $ä2 },
	{ trans => "ö", conv => "ouml_,",   phase1 => "o", phase2 => $ö2 },
	{ trans => "ü", conv => "uuml_,",   phase1 => "u", phase2 => $ü2 },

	{ trans => ",", conv => "comma_," },

	{ trans => ":", conv => "colon_," },

	{ trans => "=", conv => "equ_," },
	{ trans => "!", conv => "gyoe_," },
	{ trans => "?", conv => "hate_," },
	{ trans => ".", conv => "kten_," },
	{ trans => "*", conv => "batu_," },
	{ trans => "/", conv => "sura_," },
	{ trans => " ", conv => "spc_,", phase1 => " $spc1", phase2 => $spc2 },
	{ trans => "-", conv => "bou_," },
	{ trans => '$', conv => "yen_," },
	{ trans => "+", conv => "plus_," },
	{ trans => "'", conv => "kakot_," },
	{ trans => "%", conv => "percent_," },
	{ trans => "(", conv => "paren_," },
	{ trans => ")", conv => "parent_," },
	{ trans => "<", conv => "less_," },
	{ trans => ">", conv => "greater_," },

	{ trans => "0", conv => "n0_," },
	{ trans => "1", conv => "n1_," },
	{ trans => "2", conv => "n2_," },
	{ trans => "3", conv => "n3_," },
	{ trans => "4", conv => "n4_," },
	{ trans => "5", conv => "n5_," },
	{ trans => "6", conv => "n6_," },
	{ trans => "7", conv => "n7_," },
	{ trans => "8", conv => "n8_," },
	{ trans => "9", conv => "n9_," },

	{ trans => "A", conv => "A__,",  phase2 => $A2 },
	{ trans => "B", conv => "B__," },
	{ trans => "C", conv => "C__,",  phase2 => $C2 },
	{ trans => "D", conv => "D__," },
	{ trans => "E", conv => "E__,",  phase2 => $E2 },
	{ trans => "F", conv => "F__," },
	{ trans => "G", conv => "G__," },
	{ trans => "H", conv => "H__," },
	{ trans => "I", conv => "I__,",  phase2 => $I2 },
	{ trans => "J", conv => "J__," },
	{ trans => "K", conv => "K__," },
	{ trans => "L", conv => "L__," },
	{ trans => "M", conv => "M__," },
	{ trans => "N", conv => "N__,",  phase1 => "N$N1" },
	{ trans => "O", conv => "O__,",  phase2 => $O2 },
	{ trans => "P", conv => "P__," },
	{ trans => "Q", conv => "Q__," },
	{ trans => "R", conv => "R__," },
	{ trans => "S", conv => "S__," },
	{ trans => "T", conv => "T__," },
	{ trans => "U", conv => "U__,",  phase2 => $U2 },
	{ trans => "V", conv => "V__," },
	{ trans => "W", conv => "W__," },
	{ trans => "X", conv => "X__," },
	{ trans => "Y", conv => "Y__," },
	{ trans => "Z", conv => "Z__," },

	{ trans => "a", conv => "a__,",  phase2 => $a2 },
	{ trans => "b", conv => "b__," },
	{ trans => "c", conv => "c__,",  phase2 => $c2 },
	{ trans => "d", conv => "d__," },
	{ trans => "e", conv => "e__,",  phase2 => $e2 },
	{ trans => "f", conv => "f__," },
	{ trans => "g", conv => "g__," },
	{ trans => "h", conv => "h__," },
	{ trans => "i", conv => "i__,",  phase2 => $i2 },
	{ trans => "j", conv => "j__," },
	{ trans => "k", conv => "k__," },
	{ trans => "l", conv => "l__," },
	{ trans => "m", conv => "m__," },
	{ trans => "n", conv => "n__,",  phase1 => "n$n1" },
	{ trans => "o", conv => "o__,",  phase2 => $o2 },
	{ trans => "p", conv => "p__," },
	{ trans => "q", conv => "q__," },
	{ trans => "r", conv => "r__,",  phase2 => $r2 },
	{ trans => "s", conv => "s__,",  phase2 => $s2 },
	{ trans => "t", conv => "t__," },
	{ trans => "u", conv => "u__,",  phase2 => $u2 },
	{ trans => "v", conv => "v__," },
	{ trans => "w", conv => "w__," },
	{ trans => "x", conv => "x__," },
	{ trans => "y", conv => "y__," },
	{ trans => "z", conv => "z__," }
);

our %SHARP_LANG_TABLE = (
	English => [
		{ trans => "PBLOCK",  conv => "ompo_,omke_,pblock0_,pblock1_,pblock2_,",
		  sort_conv => "POKéBLOCK" }
	],
	French  => [
		{ trans => "PBLOC",   conv => "ompo_,omke_,pblock0_,pblock1_,pblock2_,",
		  sort_conv => "POKéBLOC" },
		{ trans => "PCO",     conv => "pco_,",
		  sort_conv => "Pco" }
	],
	German  => [
		{ trans => "PRIEGEL", conv => "ompo_,omke_,pblock0_,pblock1_,pblock2_,",
		  sort_conv => "POKéRIEGEL" }
	],
	Italian => [
		{ trans => "PMELLA",  conv => "ompo2_,omke2_,pblock0_,pblock1_,pblock2_,",
		  sort_conv => "POKéMELLA" },	# 単数形。
		{ trans => "PMELLE",  conv => "ompo2_,omke2_,pblock0_,pblock1_,pblocks_,",
		  sort_conv => "POKéMELLE" },	# 複数形。
	],
	Spanish => [
		{ trans => "PCUBO",   conv => "ompo_,omke_,pblock0_,pblock1_,pblock2_,",
		  sort_conv => "POKéCUBO" }
	]
);

our @BRAILLE_TABLE = (
	{ trans => "Ä", conv => "BRA_auml_," },
	{ trans => "Ö", conv => "BRA_ouml_," },
	{ trans => "Ü", conv => "BRA_uuml_," },
	{ trans => "ä", conv => "BRA_auml_," },
	{ trans => "ö", conv => "BRA_ouml_," },
	{ trans => "ü", conv => "BRA_uuml_," },
	{ trans => "a", conv => "BRA_a_," },
	{ trans => "b", conv => "BRA_b_," },
	{ trans => "c", conv => "BRA_c_," },
	{ trans => "d", conv => "BRA_d_," },
	{ trans => "e", conv => "BRA_e_," },
	{ trans => "f", conv => "BRA_f_," },
	{ trans => "g", conv => "BRA_g_," },
	{ trans => "h", conv => "BRA_h_," },
	{ trans => "i", conv => "BRA_i_," },
	{ trans => "j", conv => "BRA_j_," },
	{ trans => "k", conv => "BRA_k_," },
	{ trans => "l", conv => "BRA_l_," },
	{ trans => "m", conv => "BRA_m_," },
	{ trans => "n", conv => "BRA_n_," },
	{ trans => "o", conv => "BRA_o_," },
	{ trans => "p", conv => "BRA_p_," },
	{ trans => "q", conv => "BRA_q_," },
	{ trans => "r", conv => "BRA_r_," },
	{ trans => "s", conv => "BRA_s_," },
	{ trans => "t", conv => "BRA_t_," },
	{ trans => "u", conv => "BRA_u_," },
	{ trans => "v", conv => "BRA_v_," },
	{ trans => "w", conv => "BRA_w_," },
	{ trans => "x", conv => "BRA_x_," },
	{ trans => "y", conv => "BRA_y_," },
	{ trans => "z", conv => "BRA_z_," },
	{ trans => "A", conv => "BRA_a_," },
	{ trans => "B", conv => "BRA_b_," },
	{ trans => "C", conv => "BRA_c_," },
	{ trans => "D", conv => "BRA_d_," },
	{ trans => "E", conv => "BRA_e_," },
	{ trans => "F", conv => "BRA_f_," },
	{ trans => "G", conv => "BRA_g_," },
	{ trans => "H", conv => "BRA_h_," },
	{ trans => "I", conv => "BRA_i_," },
	{ trans => "J", conv => "BRA_j_," },
	{ trans => "K", conv => "BRA_k_," },
	{ trans => "L", conv => "BRA_l_," },
	{ trans => "M", conv => "BRA_m_," },
	{ trans => "N", conv => "BRA_n_," },
	{ trans => "O", conv => "BRA_o_," },
	{ trans => "P", conv => "BRA_p_," },
	{ trans => "Q", conv => "BRA_q_," },
	{ trans => "R", conv => "BRA_r_," },
	{ trans => "S", conv => "BRA_s_," },
	{ trans => "T", conv => "BRA_t_," },
	{ trans => "U", conv => "BRA_u_," },
	{ trans => "V", conv => "BRA_v_," },
	{ trans => "W", conv => "BRA_w_," },
	{ trans => "X", conv => "BRA_x_," },
	{ trans => "Y", conv => "BRA_y_," },
	{ trans => "Z", conv => "BRA_z_," },
	{ trans => " ", conv => "BRA_spc_," }
);

our %BRAILLE_LANG_TABLE = (
	English => [
		{ trans => ",", conv => "BRA_comma_," },
		{ trans => ".", conv => "BRA_kten_," }
	],
	French  => [
		{ trans => ",", conv => "BRA_comma_," },
		{ trans => ".", conv => "BRA_kten_," },
		{ trans => "-", conv => "BRA_bou_," }
	],
	German  => [
		{ trans => ",", conv => "BRA_prefix_,BRA_comma_," },
		{ trans => ".", conv => "BRA_prefix_,BRA_kten_," }
	],
	Italian => [
		{ trans => ",", conv => "BRA_comma_," },
		{ trans => ".", conv => "BRA_kten_," }
	],
	Spanish => [
		{ trans => ",", conv => "BRA_prefix_,BRA_comma_," },
		{ trans => ".", conv => "BRA_prefix_,BRA_kten_," }
	]
);

our @SHARP_BRAILLE_TABLE = (
	{ trans => "NULL",       conv => "" },
);

our %SHARP_LANG_BRAILLE_TABLE = (
	English => [],
	French  => [
		{ trans => "-",          conv => "BRA_bou_," }
	],
	German  => [],
	Italian => [],
	Spanish => []
);

our @ADD_FOR_SORT = (
	{ trans => "あ", phase1 => "er",     phase2 => $er_u2 },
	{ trans => "い", phase1 => "re",     phase2 => $re_u2 },
	{ trans => "う", phase1 => "a",      phase2 => $a_u2 },
	{ trans => "え", phase1 => " $spc1", phase2 => $o_u2 },
	{ trans => "お", phase1 => "se",     phase2 => $se_u2 },
);

our %OVERWRITE_SORT = (
	Italian => [ " ", ",", ".", "'", "?", "!", "-" ],
	Spanish => [
		{ trans => "!", phase1 => " $exc1", phase2 => "$exc2" },
		{ trans => "?", phase1 => " $que1", phase2 => "$que2" }
	]
);
